﻿<?xml version="1.0" encoding="utf-8" ?>
<Feature>
	<Dependencies>
		<Dependency type="feature">TextContentFilteringFeature.xml</Dependency>
	</Dependencies>

	<BusinessRules>
		<BusinessRule name="startBizObjDataScarf" security="disabled">
			<LocalClass name="Syrinx.BizObjDataScarfBizRules,ScsCore" />
		</BusinessRule>
		<BusinessRule name="processConnectorDataScarf" security="disabled">
			<LocalClass name="Syrinx.BizObjDataScarfBizRules,ScsCore" />
		</BusinessRule>
		<BusinessRule name="processBizObjDataScarf" security="disabled">
			<LocalClass name="Syrinx.BizObjDataScarfBizRules,ScsCore" />
		</BusinessRule>
		<BusinessRule name="startBizObjListDataScarf" security="disabled">
			<LocalClass name="Syrinx.BizObjDataScarfBizRules,ScsCore" />
		</BusinessRule>
	</BusinessRules>
	<BusinessObjects>
		<BusinessObject type="SiteUrl">
			<Field name="url" type="String" />
			<Field name="type" type="String">GET</Field>
			<Field name="data" type="String" />
		</BusinessObject>
		<BusinessObject type="ScarfRuntimeInfo">
			<Field name="totalPagesDownloaded" type="Integer" />
			<Field name="totalBytesDownloaded" type="BigInteger" />
			<Field name="totalPagesRetrievedFromCache" type="Integer" />
			<Field name="totalImagesFound" type="Integer" />
			<Field name="startTime" type="Date" />
			<Field name="endTime" type="Date" />
			<Field name="traceLog" type="String" xmlOut="rawElement" />
			
			<Method name="timeLapse" language="jscript.NET" xmlOut="attrib"><![CDATA[
				return self.getItem("endTime") - self.getItem("startTime");
			]]></Method>
		</BusinessObject>
		
		<BusinessObject type="SiteScarf" key="id">
			<Field name="id" type="String" />
			<Field name="baseSiteUrl" type="String" />
			<Field name="newImageStructure" type="String"/>
      <Field name="newImageStructureNoLink" type="String"/>
			<Field name="imageCache" type="String" />
      <Field name="blindDownloadImages" type="Boolean">True</Field>
			<Field name="leaveImageOrigSizeIfContains" type="String"/>
			<Field name="useParallel" type="Boolean">True</Field>

			<Field name="runtime" type="ScarfRuntimeInfo" />
			<Field name="saveRuntimeLocation" type="String" />

			<Field name="siteUserId" type="String" />
			<Field name="sitePassword" type="String" />
			<Field name="userIdFormField" type="String" />
			<Field name="passwordFormField" type="String" />
			<Field name="login" type="SiteUrl" />
			<Field name="loginFieldRegex" type="String" />
			<Field name="preLogin" type="SiteUrl" />
			<Field name="postLogin" type="SiteUrl" />
			<Field name="logoutUrl" type="String" />

			<Field name="filter" type="ArticleContentFilter" />
			<Field name="filterFields" type="String" />

			<Field name="pageCacheLocation" type="String" />
			<Field name="pageLoadFailureRegex" type="String" />
 
			<Field name="cookies" type="String" />
			<Field name="lastSaveTime" type="Date" />
      <Field name="timeDiffFromUTC" type="Integer" />
      <Field name="preferredIpEndPoint" type="String" />
		</BusinessObject>
		

		<BusinessObject type="BizObjScarfDataPoint" key="fieldName">
			<Field name="fieldName" type="String" />
			<Field name="detail" type="SiteUrl" />
			<Field name="elementRegex" type="String" />
			<Field name="dataType" type="String">text</Field> <!--Known: image, text -->
			<Field name="imageNameFormat" type="String" />
		</BusinessObject>

		<BusinessObject type="ConnectorRuntime">
			<Field name="totalBizObjs" type="Integer">-1</Field>
			<Field name="totalPages" type="Integer">-1</Field>
		</BusinessObject>
		
		<BusinessObject type="BizObjScarfConnector" key="id">
			<Field name="id" type="String" />
			<!--As elements are found in a list page, this type of bizobj will be created
			    to hold itds data.  -->
			<Field name="bizObjType" type="String" />

			<!-- These are for the list of bizobjs work-->
			<Field name="maxElements" type="Integer" />
			<Field name="sectionRegex" type="String" />
			<Field name="elementRegex" type="String" />
			<Field name="totalPagesRegex" type="String" />
			<Field name="specificListPage" type="SiteUrl" />
			
			<!-- These are for the details of a bizobj work-->
			<Field name="elementDetails" type="SiteUrl" />

			<Field name="getDetailsWhenHaveAlready" type="Boolean" />
			<Field name="getDetailBizRule" type="String" />
			<Field name="updateBizObjBizRule" type="String" />

			<Field name="baseElementDetailRegex" type="String" />
			<Field name="dataPoints" type="List(BizObjScarfDataPoint)" />
			<Field name="elementSegments" type="List(BizObjScarfDataPoint)" />
			<Field name="connectors" type="List(BizObjScarfConnector)" />

			<Field name="runtime" type="ConnectorRuntime" />
		</BusinessObject>

		<BusinessObject type="BaseBizObjSiteScarf" extends="SiteScarf" key="id">
			<Field name="initialStart" type="SiteUrl" />
			<Field name="connectors" type="List(BizObjScarfConnector)" />		
		</BusinessObject>
		
	</BusinessObjects>
</Feature>